package classes
{
	import flash.display.Sprite;
	
	public class HistoryObject extends Sprite
	{
		private var _action:String;
		private var _properties:XML;
		private var _objectID:Number;
		
		public function set Action(parm:String):void{
			this._action = parm;
		}
		public function get Action():String{
			return this._action;
		}
		
		public function set PageNumber(parm:Number):void{
			this._objectID = parm;
		}
		public function get PageNumber():Number{
			return this._objectID;
		}

		public function set Properties(parm:XML):void{
			if ( parm == null ){
				return;
			}
			if ( parm.localName().toString().toUpperCase() != "HISTORY" ){
				parm.setLocalName("History");
			}
			this._properties = parm.copy();
		}
		public function get Properties():XML{
			if ( this._properties == null ){
				this._properties = new XML(<History />);
			}
			return this._properties;
		}
		
		public function HistoryObject(parmAction:String = "",parmPageNumber:Number = 0,parmProperties:XML = null)
		{
			super();
			this.Action = parmAction;
			this.PageNumber = parmPageNumber
			this.Properties = parmProperties;
		}
		public override function toString():String{
			var retValue:String = "Action: "+this.Action+"\n";
			retValue += "PageNumber: "+this.PageNumber.toString()+"\n";
			retValue += "Properties: "+this.Properties.toXMLString()+"\n";
			return retValue;
		}
	}
}